@echo off

CHCP 65001

echo ****************************************

echo *****Zabbix Agentd Operation************

echo ****************************************

echo ** a. start Zabbix Agentd********

echo ** b. stop Zabbix Agentd********

echo ** c. restart Zabbix Agentd********

echo ** d. install Zabbix Agentd********

echo ** e. uninstall Zabbix Agentd********

echo ** f. exit Zabbix Agentd********

echo ****************************************

:loop

choice /c abcdef /M "please choose"

if errorlevel 6 goto :exit 

if errorlevel 5 goto uninstall

if errorlevel 4 goto install

if errorlevel 3 goto restart

if errorlevel 2 goto stop

if errorlevel 1 goto start

:start

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -s

goto loop

:stop

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -x

goto loop

:restart

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -x

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -s

goto loop

:install

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -i

goto loop

:uninstall

E:\zabbix_agent-4.0.18-windows-amd64\bin\zabbix_agentd.exe -c E:\zabbix_agent-4.0.18-windows-amd64\conf\zabbix_agentd.conf -d

goto loop

:exit

exit